import { createStore, combineReducers, applyMiddleware } from 'redux';
import { composeWithDevTools  } from 'redux-devtools-extension';
import { routes, userinfo, currentDoingInfo, playerChangeData } from './reducer'
import thunkMiddleware from 'redux-thunk'

let reducer = combineReducers({ routes, userinfo, currentDoingInfo, playerChangeData })
let middlewares = [
  thunkMiddleware
]

const composeEnhancers = composeWithDevTools({
  // Specify name here, actionsBlacklist, actionsCreators and other options if needed
});
const store = createStore(reducer, /* preloadedState, */ composeEnhancers(
  applyMiddleware(...middlewares),
  // other store enhancers if any
));
export default store